package com.pictavore.message

/**
 *
 * @author caleb
 */
class Message {
	MessageType type
    Object[] parameters
    def sender

    def Message(type, sender, Object... parameters) {
        this.type = type
        this.sender = sender
        this.parameters = parameters
    }

    /*
     * Some message types
     */
    static ERROR_MESSAGE = new BaseMessageType("error_message")
    static WARNING_MESSAGE = new BaseMessageType("warning_message")
    static INFO_MESSAGE = new BaseMessageType("info_message")
    static LOAD_IMAGE = new BaseMessageType("load_image")
}

class BaseMessageType extends MessageType {
    BaseMessageType(String name) {
        super(name);
    }
}